 #!/usr/bin/env python
import os
import shutil 

print("Hello new world")

l = os.listdir(".")
print(l)


def ClearListCurDir(curDir):
    retList = []
    curList = []
    curList = os.listdir(curDir)
    for item in curList:
        path = curDir + "/" + item
        if os.path.isdir(path):            
            if item == ".gitee" or item == ".git":
                shutil.rmtree(path)
#                 print(path)
            else:
                retList.append(path)
    print(retList)
    return retList
def DealTree(tree):
    dirList = []
    dirList.append(tree)
    while dirList != []:
        curDir = dirList.pop(0)
        print(curDir)
        curList = ClearListCurDir(curDir)
        for item in curList:
            dirList.append(item)
    
if __name__ == "__main__":
    DealTree(".")
    